﻿using NicoView.Model.Service.Property;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NicoView.Model.Service.Comments
{
    public class CommentNgShareLevelModel
    {
        private CommentNgShareLevel ngShareLevel;

        public CommentNgShareLevelModel() : this(CommentNgShareLevel.Medium) { }

        public CommentNgShareLevelModel(CommentNgShareLevel commentNgShareLevel)
        {
            this.ngShareLevel = commentNgShareLevel;
        }


        public CommentNgShareLevel NgShareLevel
        {
            get
            {
                return this.ngShareLevel;
            }
        }

        public string Description
        {
            get
            {
                return CommentNgShareLevelToName(this.ngShareLevel);
            }
        }


        public static string CommentNgShareLevelToName(CommentNgShareLevel commentNgShareLevel)
        {
            switch (commentNgShareLevel)
            {
                case CommentNgShareLevel.None:
                    return "NG設定なし";

                case CommentNgShareLevel.Low:
                    return "NG共有レベル低";

                case CommentNgShareLevel.Medium:
                    return "NG共有レベル中";

                case CommentNgShareLevel.High:
                    return "NG共有レベル高";

                default:
                    return "不明なレベル";
            }
        }

        private static CommentNgShareLevelModel[] ngShareLevelModels;

        public static IEnumerable<CommentNgShareLevelModel> GetNgShareLevels()
        {
            if (ngShareLevelModels == null)
            {
                ngShareLevelModels = new CommentNgShareLevelModel[] { new CommentNgShareLevelModel(CommentNgShareLevel.None), new CommentNgShareLevelModel(CommentNgShareLevel.Low), new CommentNgShareLevelModel(CommentNgShareLevel.Medium), new CommentNgShareLevelModel(CommentNgShareLevel.High) };
            }
            return ngShareLevelModels;
        }
    }
}
